﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace WebShop_Project
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = ListView1.SelectedIndex.ToString();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text = "test";
            foreach (ListViewDataItem item in ListView1.Items)
            {
                var isChecked = item.FindControl("ActiveArticleCheckBox") as HtmlInputCheckBox;
                if (isChecked != null && isChecked.Checked)
                {
                    Label1.Text += isChecked.Value;
                }
            }
        }
    }
}